<template>
    <div>
        <h3>鲁班</h3>
        <p>{{weather}}123</p>
        <img src="../../public/luban.jpg" alt="" @click="testEvent">
    </div>
</template>

<script>

export default {
    asyncData ({ store, route }) {
        // 触发 action 后，会返回 Promise
        return store.dispatch('FETCH_WEATHER')
        console.log(1234)
    },
    props: {

    },
    data() {
        return {

        };
    },
    computed: {
        // 从 store 的 state 对象中的获取 item。
        weather () {
            return this.$store.state.weather
        }
    },
    created() {

    },
    mounted() {

    },
    watch: {

    },
    methods: {
        testEvent(){
            alert(1234)
        }
    },
    components: {

    },
};
</script>

<style scoped>

</style>
